package com.daoImpl;

import com.bean.Collect;
import com.dao.BasicDAO;
import com.dao.CollectDAO;

/**
 * @author 徐洲
 * @version 1.0
 */
public class CollectDAOImpl extends BasicDAO<Collect> implements CollectDAO {
    /**
     * 查询是否收藏文章
     */
    @Override
    public boolean sCollectArticle(Object userid, String article_id) {
        String sql = "SELECT * FROM collect WHERE user_id = ? AND article_id = ?;";
        Object o = querySingle(sql, Collect.class, userid, article_id);
        return o != null;
    }
}
